<template>
	<view class="container">
		<view class="sticky">
			测试
		</view>
		<h-list ref="list" @refresh="refresh">
			<view>
				<view class="item" v-for="i in list" :key="i">{{'item_'+i}}</view>
			</view>
		</h-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [1,2,3,4,5,6,7,8,9,10]
			}
		},
		methods: {
			refresh() {
				setTimeout(() => {
					this.$refs.list.completed()
				}, 5000)
			}
		}
	}
</script>

<style>
	.sticky {
		position: sticky;
		top: 0;
	}
	.container {
		position: absolute;
		left: 0;
		right: 0;
		top: 0;
		bottom: 0;
		padding: 110rpx 0 160rpx;
		box-sizing: border-box;
	}
	.item {
		height: 160rpx;
		line-height: 160rpx;
		padding: 0 20rpx;
	}
	.item:nth-child(2n+1) {
		background-color: aqua;
	}
	.item:nth-child(2n) {
		background-color: bisque;
	}
</style>